package com.effective.java.clone.bean;

/**
 * Author: Eric
 * 7/20/2022 8:22 PM
 */
public class People implements Cloneable{
    private String name;
    private Agent agent;
    private Short height;
    private Color color;

    public People(String name, Agent agent, Short height, Color color) {
        this.name = name;
        this.agent = agent;
        this.height = height;
        this.color = color;
    }

    @Override
    public People clone() throws CloneNotSupportedException {
        return (People)super.clone();
    }

    @Override
    public String toString() {
        return "People{" +
                "name='" + name + '\'' +
                ", agent=" + agent +
                ", height=" + height +
                ", color=" + color +
                '}';
    }

    public Color getColor() {
        return color;
    }
}
